<?php
// 检查现有菜单的所有字段
$host = '127.0.0.1';
$port = 3306;
$database = 'qiandao';
$username = 'root';
$password = 'root';

try {
    $pdo = new PDO("mysql:host={$host};port={$port};dbname={$database};charset=utf8mb4", $username, $password);
    $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
    
    echo "=== 检查现有菜单的所有字段 ===\n\n";
    
    // 查询系统管理菜单
    echo "1. 系统管理菜单:\n";
    $stmt = $pdo->query("SELECT * FROM system_menu WHERE title = '系统管理' LIMIT 1");
    $menu = $stmt->fetch(PDO::FETCH_ASSOC);
    
    if ($menu) {
        echo "字段列表:\n";
        foreach ($menu as $key => $value) {
            echo "  {$key}: " . (is_null($value) ? 'NULL' : $value) . "\n";
        }
    }
    
    // 查询打卡积分菜单
    echo "\n2. 打卡积分菜单:\n";
    $stmt = $pdo->query("SELECT * FROM system_menu WHERE title = '打卡积分' LIMIT 1");
    $menu = $stmt->fetch(PDO::FETCH_ASSOC);
    
    if ($menu) {
        echo "字段列表:\n";
        foreach ($menu as $key => $value) {
            echo "  {$key}: " . (is_null($value) ? 'NULL' : $value) . "\n";
        }
    }
    
} catch (PDOException $e) {
    echo "错误: " . $e->getMessage() . "\n";
}

